package org.dingyom.org.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.dingyom.basics.domain.BaseDomain;
import org.dingyom.basics.constants.BaseConstants;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author dingyom
 * @since 2022-09-01
 */
public class Shop extends BaseDomain{

    private static final long serialVersionUID = 1L;

    private Long id;
    private String name;
    private String tel;
    private Date registerTime;
    /**
     * 待审核 审核通过 驳回
     */
    private Integer state = BaseConstants.Shop.STATE_WAIT_AUTID;
    private String address;
    private String logo;
    /**
     * 店铺管理员,关联员工表
     */
    private Long adminId;
    private Employee admin;

    public Employee getAdmin() {
        return admin;
    }

    public void setAdmin(Employee admin) {
        this.admin = admin;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    @JsonFormat(pattern = "yy-MM-dd hh:mm:ss",timezone = "GTM+8")
    public Date getRegisterTime() {
        return registerTime;
    }
    @DateTimeFormat(pattern = "yy-MM-dd hh:mm:ss")
    public void setRegisterTime(Date registerTime) {
        this.registerTime = registerTime;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public Long getAdminId() {
        return adminId;
    }

    public void setAdminId(Long adminId) {
        this.adminId = adminId;
    }

    @Override
    public String toString() {
        return "Shop{" +
        ", id=" + id +
        ", name=" + name +
        ", tel=" + tel +
        ", registerTime=" + registerTime +
        ", state=" + state +
        ", address=" + address +
        ", logo=" + logo +
        ", adminId=" + adminId +
        "}";
    }
}
